import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        cityid: "",
        cityname: "",
        address: "",
        geohash: []
    },
    mutations: {
        getcityid(state, city) {
            this.state.cityid = city[0]
            this.state.cityname = city[1]
            console.log(this.state.cityname);
        },
        getaddress(state, address) {

            state.address = address[0]
            state.geohash = address[1]
            // console.log(state.geohash);
        }
    },
    actions: {
    },
    modules: {
    }
})
